Password Prompt



If a visitor wants to go a password protected page, they must first enter the correct password on the page with this script (this page) This script will just take you to [password you enter].html This is a very good script if JavaScript is enabled and as long as you have an index.html file in your directory. As an added bonus, it's only 8 lines! Unlike the others, the password is the protected filename without the .html ending.

--------------------------------------------------------------------------------
 

<!-- ONE STEP TO INSTALL PASSWORD PROMPT:

   1.  Put the designated coding into the BODY of your login HTML document  -->

<!-- STEP ONE: Copy this code into the BODY of your login HTML document  -->

<BODY>

<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->

<!-- Begin
var password = ''
password=prompt('Please enter your password:','');
if (password != null) {
location.href= password + ".html";
}
// End -->
</SCRIPT>

<p><center>
<font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
</center><p>

<!-- Script Size:  0.58 KB  -->
